# Contributor: Coco Liliace <coco@liliace.dev>
# Maintainer: Coco Liliace <coco@liliace.dev>
pkgname=aercbook
pkgver=0.1.4
pkgrel=0
pkgdesc="Minimalistic address book for aerc"
url="https://sr.ht/~renerocksai/aercbook/"
arch="aarch64 x86_64"
license="MIT"
makedepends="zig"
options="!check" # no tests
source="$pkgname-$pkgver.tar.gz::https://git.sr.ht/~renerocksai/aercbook/archive/v$pkgver.tar.gz"
builddir="$srcdir/$pkgname-v$pkgver"

# We may want other than "baseline" for other targets, when enabled by zig
case "$CARCH" in
	aarch64|x86_64) cputarget=baseline ;;
esac

build() {
	zig build -Doptimize=ReleaseSafe ${cputarget:+-Dcpu="$cputarget"}
}

package() {
	install -Dm755 -t "$pkgdir"/usr/bin ./zig-out/bin/aercbook
}

sha512sums="
3a514af7faa997629b8e38375ae52dbf4732f25a374466ed653d33bd2f8aa6543c316f0e6f2a90ede1cf0be8dd1fdc8942ebbc263cde805ea5e5606cce0e50d2  aercbook-0.1.4.tar.gz
"
